﻿using Comkarl.Web.Resources;
using Comkarl.Web.UI.Controls;
using System;

namespace Comkarl.Calipso.Web.SampleClient.Controls
{
    public class SampleControl : ScriptControl
    {
        protected override string CommonID
        {
            get
            {
                return "SampleControl";
            }
        }

        protected override string ControlElementCssClass
        {
            get
            {
                return "SampleControlContainer";
            }
        }

        public override bool Standalone
        {
            get
            {
                return true;
            }
        }

        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            JavaScriptManager.RegisterInclude
            (
                "Classes//UI/Controls/SampleControl",
                "Comkarl.Calipso.Web.SampleClient.Controls.SampleControl.ScriptControl.js, Comkarl.Calipso.Web.SampleClient",
                ResourceKind.Resource
            );

            JavaScriptManager.RegisterReference("Classes//UI/Controls/SampleControl", Standalone);
        }
    }
}